<!DOCTYPE html>
<html>
<head>
  <% if content_for?(:title) %>
    <%= yield(:title) %>
  <% else %>
    <title>Dummy</title>
  <% end %>

  <%= yield :head %>

  <%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', defer: true) %>

  <%= csrf_meta_tags %>
</head>
<body>
<% flash.each do |key, value| %>
  <%= content_tag :div, value, class: "flash #{key}" %>
<% end %>
<%= render "shared/header" %>

<%= yield %>

<!-- This is a placeholder for ReactOnRails to know where to render the store props for
     client side hydration -->
<%= redux_store_hydration_data %>

</body>
</html>
